package model;

/**
 * The Volunteer User class.
 * @author: Justin Kudlo
 */
public class Volunteer extends User{
	/**
	 * The classes serializable ID.
	 */
	private static final long serialVersionUID = 
		-2624978032465381835L;
	/**
	 * The volunteers group leader flag.
	 */
	private boolean isGL;

	/**
	 * Instantiates a new Volunteer.
	 * 
	 * @param first the users first name.
	 * @param last the users last name.
	 * @param pass the users password.
	 * @param phone the users phone number.
	 * @param dob the users date of birth.
	 * @param email the users email address.
	 * @param userName the users username.
	 */
	public Volunteer(final String first,
			final String last,
			final String pass,
			final String phone,
			final String dob,
			final String email,
			final String userName) {
		super(first, last, pass, phone, dob, email, 
				userName);
		isGL = false;
	}
	
	/**
	 * Sets if the volunteer is a group leader or not.
	 * @param GLTraining true if the Voluteer has taken the
	 * group leader training.
	 */
	public void setGLStatus(boolean GLTraining) {
		if (GLTraining == true) {
			isGL = true;
		} else {
			isGL = false;
		}
	}
	
	/**
	 * Returns if the volunteer is a group leader.
	 * @return if the volunteer is a group leader.
	 */
	public boolean isGL() {
		return isGL;
	}
	
}
